//
//  OtherViewController.m
//  rn
//
//  Created by 牛冬冬 on 2018/3/28.
//  Copyright © 2018年 Jevons-niu. All rights reserved.
//

#import "OtherViewController.h"
#import <React/RCTRootView.h>

@interface OtherViewController ()

@end

@implementation OtherViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios"];
    logd(@"self.moduleId: %@", (self.moduleId?:@""));
    RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                        moduleName:@"RNDemos"
                                                 initialProperties:@{@"moduleId":self.moduleId?:@""}
                                                     launchOptions:nil];
    self.view = rootView;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
